package com.ag.work.service.impl;

import java.util.Date;

import com.ag.bean.TbDisposalAdvice;
import com.ag.work.dao.MyAdviceDAO;
import com.ag.work.service.IDisposalStatusService;

public class DisposalStatusServiceImpl implements IDisposalStatusService {

	private MyAdviceDAO myAdviceDAO;
	
    public static String ADVICE_STATUS_SQ = "1001";//申请
	
	public static String ADVICE_STATUS_YDWH = "1002";//已读未回复
	
	public static String ADVICE_STATUS_YDYH = "1003";//回复
	
	
	@Override
	public TbDisposalAdvice changeDispStatus(String statusId, String daId) {
		System.out.println("在改变建议状态中取得daId-------------"+daId);
		TbDisposalAdvice disposalAdvice = myAdviceDAO.findById(daId);
		System.out.println("得到的对象：disposalAdvice---"+disposalAdvice);
		disposalAdvice.setC(statusId);
		//disposalAdvice.setDaSubmitTime(new Date());
		myAdviceDAO.attachDirty(disposalAdvice);
		return disposalAdvice;
	}
	
	public MyAdviceDAO getMyAdviceDAO() {
		return myAdviceDAO;
	}

	public void setMyAdviceDAO(MyAdviceDAO myAdviceDAO) {
		this.myAdviceDAO = myAdviceDAO;
	}

}
